package com.hyl.controller;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Description TODO
 * @Author com.hyl
 * @Date 2022/10/15 9:32
 **/
@Controller
@RequestMapping("/storageRecord")
public class StorageRecordController {

	Logger logger = Logger.getLogger(StorageRecordController.class);

	@RequestMapping("/toAdd")
	public String toAdd(){
		logger.info("进入添加页面");
		return "storageRecord/add";
	}

	@RequestMapping("/add")
	public String add(){
		logger.info("添加");
		return "redirect:storageRecord/list"; //重定向==》获取列表数据
	}


	@RequestMapping("/list")
	public String list(){
		logger.info("列表");
		return "storageRecord/list";
	}


	@RequestMapping("/toUpdate")
	public String toUpdate(){
		logger.info("进入修改页面");
		return "storageRecord/update";
	}

	@RequestMapping("/update")
	public String update(){
		logger.info("修改");
		return "redirect:storageRecord/list"; //重定向==》获取列表数据
	}

	@RequestMapping("/del")
	public String del(){
		logger.info("删除");
		return "storageRecord/update";
	}

	@RequestMapping("/view")
	public String view(){
		logger.info("详情");
		return "storageRecord/view";
	}
}
